#include<iostream>

using namespace std;

//任意整数的补码输出方法（综合）
void binary_print(int n) {
    for (int i = 31; i >= 0; i--) {
        if (i % 8 == 7)cout << " ";
        cout << ((n >> i) & 1);
    }
    cout << endl;
}

int main() {
    int n = 16;
    cin >> n;
    // binary_print(n);
    if (n < 256)
        n |= (1 << 8);
    //  binary_print(n);
    n *= n;
    //  binary_print(n);
    n = n << 8;
    // binary_print(n);
    n = n >> 16;
    //binary_print(n);
    cout << n << endl;
    return 0;

}